<?php if (!defined('THINK_PATH')) exit();?><div class="row">
    <div class="col-sm-12">
        <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
            <thead>
                <tr role="row">
                    <th class="sorting text-center" tabindex="0">ID</th>
                    <th class="sorting text-center" tabindex="0">分类名称</th>
                    <th class="sorting text-center" tabindex="0">排序</th>
                    <th class="sorting text-center" tabindex="0">是否显示</th>
                    <th class="sorting text-center" tabindex="0">更新时间</th>
                    <th class="sorting text-center" tabindex="0">操作</th>
                </tr>
            </thead>
            <tbody>
            <?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr role="row">
                    <td align="center"><?php echo ($vo["id"]); ?></td>
                    <td><?php echo ($vo["cat_name"]); ?></td>
                    <td><?php echo ($vo["sort_order"]); ?></td>
                    <td align="center">
                        <img width="20" height="20" src="/Public/images/<?php if($vo[is_show] == 1): ?>yes.png<?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('categories', 'id', '<?php echo ($vo["id"]); ?>', 'is_show', this)" />
                    </td>
                    <td><?php echo (date("Y-m-d H:i:s",$vo["update_time"])); ?></td>


                <td>

                    <a href="<?php echo U('cat/cat_detail',array('id'=>$vo['id']));?>" data-toggle="tooltip" title="编辑" class="btn btn-info" data-original-title="编辑"><i class="fa fa-pencil"></i></a>

                    <a title="删除" class="btn btn-danger" href="javascript:;" data-url="<?php echo U('cat/handle_cat');?>" data-id="<?php echo ($vo["id"]); ?>" onclick="delfun(this)"><i class="fa fa-trash-o"></i></a>
                </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
            <tfoot>
            </tfoot>
        </table>
    </div>
</div>
<div class="row">
    <div class="col-sm-6 text-left"></div>
    <div class="col-sm-6 text-right"><?php echo ($page); ?></div>
</div>
<script>
    $(".pagination  a").click(function () {
        var href = $(this).attr('href');
        page = href.split('/');
        ajaxGetTable('search-form2', page[page.length - 1]);
        return false;
    });
</script>